package entitiesIds;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * LanguagelessonId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class LanguagelessonId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -8016863929175602684L;
	private Integer idLesson;
	private String abb;

	// Constructors

	/** default constructor */
	public LanguagelessonId() {
	}

	/** full constructor */
	public LanguagelessonId(Integer idLesson, String abb) {
		this.idLesson = idLesson;
		this.abb = abb;
	}

	// Property accessors

	@Column(name = "idLesson", nullable = false)
	public Integer getIdLesson() {
		return this.idLesson;
	}

	public void setIdLesson(Integer idLesson) {
		this.idLesson = idLesson;
	}

	@Column(name = "abb", nullable = false, length = 5)
	public String getAbb() {
		return this.abb;
	}

	public void setAbb(String abb) {
		this.abb = abb;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LanguagelessonId))
			return false;
		LanguagelessonId castOther = (LanguagelessonId) other;

		return ((this.getIdLesson() == castOther.getIdLesson()) || (this
				.getIdLesson() != null && castOther.getIdLesson() != null && this
				.getIdLesson().equals(castOther.getIdLesson())))
				&& ((this.getAbb() == castOther.getAbb()) || (this.getAbb() != null
						&& castOther.getAbb() != null && this.getAbb().equals(
						castOther.getAbb())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getIdLesson() == null ? 0 : this.getIdLesson().hashCode());
		result = 37 * result
				+ (getAbb() == null ? 0 : this.getAbb().hashCode());
		return result;
	}

	@Override
	public String toString() {
		return "LanguagelessonId [idLesson=" + idLesson + ", abb=" + abb + "]";
	}
	
	

}